<!DOCTYPE html>
<html>
<head>
<title>req_assign</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />

<link rel="stylesheet" type="text/css"
	href="/codebase/fonts/font_roboto/roboto.css" />
<link rel="stylesheet" type="text/css" href="/codebase/dhtmlx.css" />
<script type="text/javascript" src="/codebase/dhtmlx.js" />
<style>
</style>
<script>
	var myForm, myGrid,my_form_btn;
	function doOnLoad() {
		//alert("onload req assign");
		
		//grid setup
		if (myGrid) {
			myGrid.clearAll(true);
		}
		myGrid = new dhtmlXGridObject("grid_team_list");
		//myGrid.loadStruct("/common/testmanager/req_list.xml");
		myGrid.setImagePath("/codebase/imgs/");

		myGrid.setHeader("送测清单编号,项目名称,项目经理,测试结论,测试组织人,测试概况,严重及以上级别缺陷,一般缺陷,其他级别缺陷,关联交易/功能,渠道,类型,案例覆盖,其他说明,上线申请,上线申请人,上线步骤,应急预案,跟踪事项/目的,跟踪时间,跟踪人,注意事项");
		myGrid.setInitWidths("150,400,100,100,100,300,50,50,50,150,150,150,150,150,150,150,150,150,150,150,150,150,150");
		myGrid.setColAlign("left,left,left,left,left,left,left,left,left,left,leftleft,left,left,left,left,left,left,left,left,left,left,left");
		myGrid.setColTypes("ed,ed,ed,ed,ed,ed,ed,ed,ed,ed,ed,ed,ed,ed,ed,ed,ed,ed,ed,ed,ed,ed,ed");
		myGrid.setColSorting("str,str,str,str,str,str,str,str,str,str,str,str,str,str,str,str,str,str,str,str,str,str,str");
		//myGrid.setColumnIds("first,second");
		myGrid.xml.top = "mytop";
		myGrid.xml.row = "./myrow";
		//myGrid.enableAutoWidth(true);
		//myGrid.enableAutoHeight(true);
		myGrid.init();
		//myGrid.load("/common/testmanager/test_info_collect_test_data.xml","xml");
		//var data="{'total_count':50000, 'pos':0, 'data':[{ id:1,data:['1','测试一','赖慧芬','负责人','','','无','无','无','领取需求','1.领取需求','',]}]}";
		myGrid.load("/test/test_info_collect_grid","json");
		//myForm.loadStruct("/test/test_info_collect_grid","json");

		//myGrid.load(data,"js");
		
		// button setup
		formStructure=null;
		formStructure=[
		               {type:"button",name:"export_excel_btn",value:"导出excel"}
		              // {type:"newcolumn"},
		              // {type:"button",name:"assign_btn2",value:"导出pdf"}
			               ];
		if (my_form_btn) {
			my_form_btn.unload();
			my_form_btn = null;
		}
		my_form_btn = new dhtmlXForm("form_btn");
		my_form_btn.loadStruct(formStructure);
		my_form_btn.attachEvent("onButtonClick", function(name) {
			if (name == "export_excel_btn") {
				myGrid.toExcel('/ExcelGenerator');			
			}		
			
		});

	}
</script>
</head>
<body onload="doOnLoad();">
	<table>
		<tr>
			<td>
				<div id="form_req_base_info"></div>
			</td>
		</tr>
		<tr>
			<td>

				<div id="grid_team_list"
					style="width: 1000px; height: 400px; background-color: white;">
				</div>
			</td>
		</tr>
				<tr>
			<td>

				<div id="form_btn">
				</div>
			</td>
		</tr>
	</table>
</body>
</html>